package cj.web.kly.service;
/*
 *  
 *  
*/
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cj.web.kly.dao.SourceInforDAO;
import cj.web.kly.domain.SourceInfor;

/**
 * 
 * @author 
 *
 */
@Service
public class SourceInforService{

	@Autowired
    private SourceInforDAO sourceInforDAO;
	
	/**
	 * 查询
	 * @param subject
	 * @return subjectlis;size
	 */
	public Map query(SourceInfor sourceInfor){
		Map rep = new HashMap();
		List<SourceInfor> sourceInforlis = sourceInforDAO.query(sourceInfor);
		int size = sourceInforDAO.querySize(sourceInfor); 
		rep.put("sourceInforlis", sourceInforlis);
		rep.put("size", size);
		return rep;
    }
	
	public List<SourceInfor> queryAll(){
		return sourceInforDAO.queryAll();
    }
	
	public SourceInfor queryById(int id){
		SourceInfor obj = sourceInforDAO.queryById(id);
		return obj;
    }
	
	public void create(SourceInfor sourceInfor){
		sourceInforDAO.create(sourceInfor);
	}
	
	public void update(SourceInfor sourceInfor){
		sourceInforDAO.update(sourceInfor);
	}
	
	public void deleteById(int id){
		sourceInforDAO.deleteById(id);
	}
}